<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>导入二维码</title>
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<style>
			body {
				background: #Fff;
			}
			.inputbox {
				width:100%;
				height:24px;
				position: relative;
			}
		
			.inputbox input.file,
			.inputbox .text {
				width:100px;
				height:24px; line-height: 23px;
				background: #14a2d7; border:none;
				color:#fff; text-align: center;
				position: absolute;
				left: 0;
				top: 0;
			}
			
			.inputbox input.file {
				opacity: 0;
				z-index:2;
			}
		</style>
	</head>

	<body>
		<div style="padding:40px;">
			<div class="inputbox  ">
				<input type="file" class="file border-radius" onchange="FileUpload_onselect(this)" accept="" />
				<span class="text inline-block border-radius">选择文件</span>
				<p class="showFileName" style="margin-left:120px;"></p>
			</div>
			
			<div class="inputbox" style="margin-top:20px;">
				<span class="text inline-block border-radius" style="cursor: pointer;" onclick="FileUpload(this)">上传</span>
			</div>
			
			<div class="results none" style="border-top:1px solid #999;margin-top:30px;padding-top:20px;">
				
			</div>
		</div>

		<script src="js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/Jsclass.js" type="text/javascript" charset="utf-8"></script>
		<script>
			var index = parent.layer.getFrameIndex(window.name); /*获取窗口索引*/
			function FileUpload_onselect(obj) {
				var filePath = $(obj).val();
				if (filePath.indexOf("jpg") != -1 || filePath.indexOf("png") != -1) {
					var arr = filePath.split('\\');
					var fileName = arr[arr.length - 1];
					$(".showFileName").html("文件名："+fileName);
				} else {
					$(".showFileName").html("您未上传文件，或者您上传文件类型有误！");
					return false;
				}
			}
			
			function FileUpload(){
				showresults();
			}
			
			
			function showresults(){
				var html='<p>文件名：吧啦啦啦啦啦.csv     已导入成功，导入成功 1000 条数据，导入失败 0 条数据。</p><p>计划单需求：10000， 已完成 5845</p>';
				$('.results').show();
				$('.results').html(html);
			}
		</script>

	</body>

</html>